package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/hi")
    public String sayHi() {
        return "hi spring MVC";
    }

    @RequestMapping("/message")
    public String getMessage(String name, Integer age) {
        return "name:" + name + ", age:" + age;
    }

}
